Ray transformations under the [[Paraxial approximation]] are modeled by _ray transfer matrices_. Ray transfer matrices are also known as _ABCD_ matrices, since they describe many ray transformations as $2 \times 2$ matrices (though larger matrices can exist in some advanced applications). These matrices may correspond to any number of optical elements in an experimental setup as well as any environment through which light passes. These matrices [linearly transform](Linear%20map.md) ray vectors as follows.
$\begin{pmatrix} x_2\\
\theta_2
\end{pmatrix}=\begin{pmatrix} A & B\\
C & D
\end{pmatrix}
\begin{pmatrix} x_1\\
\theta_1
\end{pmatrix}$
Here we transform ray vectors where $x_1$ and $x_2$ are the points at which the vectors enter and exit a given region (usually a lens, mirror, cavity, etc.) and $\theta_1$ and $\theta_2$ are the respective incidence angles. These angles are taken to be equal to the ray slopes in the paraxial approximation and are sometimes written as $x_1'$ and $x_2'.$
# Principle planes
To account for the thickness and geometry of an optical element corresponding to a ray transfer matrix, we also define [principal plane](Principal%20plane.md)s at some positions, $L_1$ and $L_2$ in the below diagram relative to an arbitrary compound [lens](Lens.md) system modeled by an ABCD matrix.
Notice that the ABCD matrix does not encode the _direction_ of light propagation. This fact is useful in [modeling mirrors as lenses](Modeling%20mirrors%20as%20lenses.md) - it just encodes slope and position.
# The matrix elements

The above diagram adapted from _Lasers_ by A. Siegman shows how the matrix elements relate to the geometry of an optical system. The matrix elements relate to each other as well as the overall optical setup they belong in as follows
$f_{eff} = -\frac{1}{C}$$L_1=\frac{1-D}{C}$$L_2=\frac{1-A}{C}$
where $L_1$ and $L_2$ are the positions of the [principal plane](Principal%20plane.md)s relative to the optical system as shown in the above figure and $f_{eff}$ is the focal length of the optical element in the [thin lens approximation](Lens.md#thin%20lens%20approximation). This follows from the derivation of a general [ABCD matrix between Principle Planes](Principal%20plane.md#ABCD%20Matrix%20between%20Principle%20Planes)
The general form of an ABCD matrix defined between the focal planes is given [here](Focal%20plane.md#ABCD%20Matrix%20between%20focal%20planes).
# Properties
A given ray transfer matrix, $M$, has the following mathematical properties:
1. [det](Determinants.md#Determinant%20of%20a%20matrix)(M) = 1
# Cascading transfer matrices
Optical elements aligned in a series is modeled by the [matrix product](Linear%20Algebra%20and%20Matrix%20Theory%20(index).md#Matrices) of transfer matrices that correspond with each optical element. The result is that a final ray vector, $r_n$ following a series of $n$ [transformations](Linear%20map.md) is written as
$r_n = M_nM_{n-1}...M_2M_1r_0 = M_{tot}r_0$
where $r_0$ is the initial ray vector entering the system and we are careful to notice the matrices are arranged in inverse order.
## Sylvester's matrix theorem
The form of a ray transfer matrix passing through $n$ optical elements is given by [Sylvester's matrix theorem](Sylvester's%20matrix%20theorem.md)
$\begin{pmatrix} A & B\\
C & D
\end{pmatrix}^n = \frac{1}{\sin{\theta}}\begin{pmatrix} A\sin{(n\theta)}-\sin{((n-1)\theta)} & B\sin{(n\theta)}\\
C\sin{(n\theta)} & D\sin{(n\theta)}-\sin{((n-1)\theta)}
\end{pmatrix}$
^a43a15
This matrix models how a beam is periodically defocused and refocused as it passes through a series of $n$ optical elements through its [periodic](Analysis%20(index).md#Trigonometric%20Functions) matrix elements.
# Common examples of ray transfer matrices
The following set of elementary ray transfer matrices is adopted from _Laser Beams and Resonators_ by H. Kogelnik and T. Li. Matrix 1. is notable as being the ray transfer matrix for a ray passing through [free space](Free%20space%20light%20propagation.md) over some distance $d.$

#Electromagnetism/Optics